// 个人信息实体

import { Entity, Column, PrimaryGeneratedColumn, OneToOne, JoinColumn } from 'typeorm'
import { User } from './user.entity'
import { Expose } from 'class-transformer'
@Entity()
export class Profile {
  @PrimaryGeneratedColumn()
  @Expose()
  id: number

  @Column({ nullable: true })
  @Expose()
  name: string

  @Column({ nullable: true })
  @Expose()
  age: number

  @Column({ nullable: true })
  @Expose()
  gender: number

  @Column({ nullable: true })
  @Expose()
  email: string

  @Column({ nullable: true })
  @Expose()
  phone: string

  @Column({ nullable: true })
  @Expose()
  address: string

  @Column({ nullable: true })
  @Expose()
  hobby: string

  @Column({ nullable: true })
  @Expose()
  education: string

  @Column({ nullable: true })
  @Expose()
  job: string

  @Column({ nullable: true })
  @Expose()
  introduction: string

  @OneToOne(() => User)
  @JoinColumn()
  @Expose()
  user: User
}
